home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / StackToolsƒ / Utilities / FieldLineNumberer / cards.xml < prev    next >
Encoding:
Text File  |  1992-08-18  |  22.6 KB  |  445 lines

  1. card_2858.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>2858</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_2055.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2776</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3651.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <true /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>55</left>
  25.             <top>97</top>
  26.             <right>90</right>
  27.             <bottom>217</bottom>
  28.         </rect>
  29.         <style>rectangle</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <true /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Monaco</font>
  39.         <textSize>9</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>12</textHeight>
  42.         <name>Line Numberer</name>
  43.         <script>on mouseUp
  44. global fieldName,canDo,canScroll,theNumber,goodID
  45. if the optionKey is down then
  46. getFieldInfo
  47. if canDo then numberLines
  48. exit mouseUp
  49. end if
  50. if the shiftKey is down then
  51. if fieldName is empty then getFieldInfo
  52. if canScroll then
  53. ask "Scroll to what line number:"
  54. if it is not "Cancel" then
  55. if it is not empty then
  56. set the lockScreen to true
  57. put it into theNumber
  58. checkNumber
  59. if goodID then
  60. subtract one from it
  61. put it * the textHeight of fieldName into it
  62. set the scroll of fieldName to it
  63. numberLines
  64. exit mouseUp
  65. else
  66. answer "Bad line number." with "Sorry"
  67. set the LockScreen to false
  68. exit mouseUp
  69. end if
  70. end if
  71. end if
  72. else
  73. answer "A non-scrollable field cannot be scrolled." with ¬¨
  74. "Sorry"
  75. exit mouseUp
  76. end if
  77. end if
  78. if fieldName is empty then getFieldInfo
  79. if fieldName is not empty then numberLines
  80. end mouseUp
  81.  
  82.  
  83. on getFieldInfo
  84. global fieldName,canScroll,canDo,goodID,theField
  85. ask "Please enter field id number:" with theField
  86. if it is not empty then
  87. put it into theField
  88. put it into theNumber
  89. checkNumber
  90. if goodID then
  91. answer "Please select type of field:" with "Card" or "Background" ¬¨
  92. or "Cancel"
  93. if it is not "Cancel" then
  94. if it is "Card" then
  95. put the name of card field id theField into fieldName
  96. else put the name of background field id theField into fieldName
  97. if the style of fieldName is "scrolling" then
  98. put true into canScroll
  99. else put false into canScroll
  100. put true into canDo
  101. else put false into canDo
  102. else
  103. beep
  104. answer "The field ID must be a number" with "Sorry"
  105. getFieldInfo
  106. end if
  107. else
  108. put false into canDo
  109. if theField is empty
  110. then answer "Insufficient information to proceed." with "OK"
  111. end if
  112. end getFieldInfo
  113.  
  114. on checkNumber
  115. global theNumber,goodID
  116. repeat with theChar = 1 to the number of characters in theNumber
  117. get the charToNum of character theChar of theNumber
  118. if it<48 or it>57 then
  119. put false into goodID
  120. exit checkNumber
  121. end if
  122. end repeat
  123. put true into goodID
  124. end checkNumber
  125.  
  126.  
  127. on numberLines
  128. global fieldName,canScroll
  129. set the cursor to 4
  130. set the lockScreen to true
  131. set the textFont of card field "Line Numberer" to the textFont of ¬¨
  132. fieldName
  133. set the textSize of card field "Line Numberer" to the textSize of ¬¨
  134. fieldName
  135. put the rect of fieldName into fieldRect
  136. if canScroll then
  137. put (item four of fieldRect - item two of fieldRect) into it
  138. divide it by the textHeight of fieldName
  139. put trunc(it) into fieldLines
  140. put fieldLines * the textHeight of fieldName into it
  141. add item two of fieldRect to it
  142. put it into item four of fieldRect
  143. set the rect of fieldName to fieldRect
  144. put the scroll of fieldName into numberOfLines
  145. divide numberOfLines by the textHeight of fieldName
  146. put trunc(numberOfLines) into numberOfLines
  147. set the scroll of fieldName to (numberOfLines * the textHeight of ¬¨
  148. fieldName)
  149. else
  150. put (item four of fieldRect - item two of fieldRect) into it
  151. put trunc(it/the textHeight of fieldName) into numberOfLines
  152. end if
  153. put item one of fieldRect into item three of fieldRect
  154. subtract 35 from item one of fieldRect  --> Changes field width!
  155. set the rect of card field "Line Numberer" to fieldRect
  156. put 1 into lineCount
  157. if canScroll then
  158. repeat with theLine = (numberOfLines + 1) ¬¨
  159. to (numberOfLines + fieldLines + 1)
  160. put theLine into line lineCount of card field "Line Numberer"
  161. add 1 to lineCount
  162. end repeat
  163. else
  164. repeat with theLine = 1 to (numberOfLines + 1)
  165. put theLine into line theLine of card field "Line Numberer"
  166. end repeat
  167. end if
  168. set the lockScreen to false
  169. end numberLines
  170.  
  171. </script>
  172.     </part>
  173.     <part>
  174.         <id>2</id>
  175.         <type>field</type>
  176.         <visible> <true /> </visible>
  177.         <dontWrap> <false /> </dontWrap>
  178.         <dontSearch> <false /> </dontSearch>
  179.         <sharedText> <false /> </sharedText>
  180.         <fixedLineHeight> <true /> </fixedLineHeight>
  181.         <autoTab> <false /> </autoTab>
  182.         <lockText> <false /> </lockText>
  183.         <rect>
  184.             <left>383</left>
  185.             <top>31</top>
  186.             <right>439</right>
  187.             <bottom>151</bottom>
  188.         </rect>
  189.         <style>scrolling</style>
  190.         <autoSelect> <false /> </autoSelect>
  191.         <showLines> <false /> </showLines>
  192.         <wideMargins> <false /> </wideMargins>
  193.         <multipleLines> <false /> </multipleLines>
  194.         <reservedFamily> 0 </reservedFamily>
  195.         <titleWidth>0</titleWidth>
  196.         <icon>0</icon>
  197.         <textAlign>left</textAlign>
  198.         <font></font>
  199.         <textSize>18</textSize>
  200.         <textStyle>plain</textStyle>
  201.         <textHeight>24</textHeight>
  202.         <name></name>
  203.         <script></script>
  204.     </part>
  205.     <part>
  206.         <id>3</id>
  207.         <type>field</type>
  208.         <visible> <true /> </visible>
  209.         <dontWrap> <false /> </dontWrap>
  210.         <dontSearch> <false /> </dontSearch>
  211.         <sharedText> <false /> </sharedText>
  212.         <fixedLineHeight> <true /> </fixedLineHeight>
  213.         <autoTab> <false /> </autoTab>
  214.         <lockText> <false /> </lockText>
  215.         <rect>
  216.             <left>252</left>
  217.             <top>37</top>
  218.             <right>307</right>
  219.             <bottom>149</bottom>
  220.         </rect>
  221.         <style>rectangle</style>
  222.         <autoSelect> <false /> </autoSelect>
  223.         <showLines> <false /> </showLines>
  224.         <wideMargins> <false /> </wideMargins>
  225.         <multipleLines> <false /> </multipleLines>
  226.         <reservedFamily> 0 </reservedFamily>
  227.         <titleWidth>0</titleWidth>
  228.         <icon>0</icon>
  229.         <textAlign>left</textAlign>
  230.         <font>Monaco</font>
  231.         <textSize>9</textSize>
  232.         <textStyle>plain</textStyle>
  233.         <textHeight>12</textHeight>
  234.         <name></name>
  235.         <script></script>
  236.     </part>
  237.     <part>
  238.         <id>6</id>
  239.         <type>button</type>
  240.         <visible> <true /> </visible>
  241.         <reserved5> 0 </reserved5>
  242.         <reserved4> 0 </reserved4>
  243.         <reserved3> 0 </reserved3>
  244.         <reserved2> 0 </reserved2>
  245.         <reserved1> 0 </reserved1>
  246.         <enabled> <true /> </enabled>
  247.         <rect>
  248.             <left>4</left>
  249.             <top>316</top>
  250.             <right>88</right>
  251.             <bottom>337</bottom>
  252.         </rect>
  253.         <style>roundrect</style>
  254.         <showName> <true /> </showName>
  255.         <highlight> <false /> </highlight>
  256.         <autoHighlight> <true /> </autoHighlight>
  257.         <sharedHighlight> <true /> </sharedHighlight>
  258.         <family>0</family>
  259.         <titleWidth>0</titleWidth>
  260.         <icon>0</icon>
  261.         <textAlign>center</textAlign>
  262.         <font>Chicago</font>
  263.         <textSize>12</textSize>
  264.         <textStyle>plain</textStyle>
  265.         <name>reset card</name>
  266.         <script>on mouseUp
  267. global fieldName,theField
  268. set the lockScreen to true
  269. set the cursor to 4
  270. put empty into fieldName
  271. put empty into theField
  272. put empty into card field id 1
  273. set the rect of card field id 1 to 55,97,90,217
  274. set the textFont of card field id 1 to Monaco
  275. set the textSize of card field id 1 to 9
  276. set the rect of card field id 2 to 383,31,439,151
  277. set the textFont of card field id 2 to London
  278. set the textSize of card field id 2 to 18
  279. set the scroll of card field id 2 to 0
  280. set the rect of card field id 3 to 252,37,307,149
  281. set the textFont of card field id 3 to Monaco
  282. set the textSize of card field id 3 to 9
  283. set the rect of background field id 1 to 383,206,494,302
  284. set the textFont of background field id 1 to San Francisco
  285. set the textSize of background field id 1 to 18
  286. set the scroll of background field id 1 to 0
  287. set the rect of card field id 15 to 129,226,347,337
  288. set the lockScreen to false
  289. end mouseUp
  290. </script>
  291.     </part>
  292.     <part>
  293.         <id>7</id>
  294.         <type>button</type>
  295.         <visible> <true /> </visible>
  296.         <reserved5> 0 </reserved5>
  297.         <reserved4> 0 </reserved4>
  298.         <reserved3> 0 </reserved3>
  299.         <reserved2> 0 </reserved2>
  300.         <reserved1> 0 </reserved1>
  301.         <enabled> <true /> </enabled>
  302.         <rect>
  303.             <left>100</left>
  304.             <top>159</top>
  305.             <right>142</right>
  306.             <bottom>182</bottom>
  307.         </rect>
  308.         <style>transparent</style>
  309.         <showName> <false /> </showName>
  310.         <highlight> <false /> </highlight>
  311.         <autoHighlight> <false /> </autoHighlight>
  312.         <sharedHighlight> <true /> </sharedHighlight>
  313.         <family>0</family>
  314.         <titleWidth>0</titleWidth>
  315.         <icon>1016</icon>
  316.         <textAlign>center</textAlign>
  317.         <font>Chicago</font>
  318.         <textSize>12</textSize>
  319.         <textStyle>plain</textStyle>
  320.         <name>New Button</name>
  321.         <script></script>
  322.     </part>
  323.     <part>
  324.         <id>8</id>
  325.         <type>button</type>
  326.         <visible> <true /> </visible>
  327.         <reserved5> 0 </reserved5>
  328.         <reserved4> 0 </reserved4>
  329.         <reserved3> 0 </reserved3>
  330.         <reserved2> 0 </reserved2>
  331.         <reserved1> 0 </reserved1>
  332.         <enabled> <true /> </enabled>
  333.         <rect>
  334.             <left>100</left>
  335.             <top>186</top>
  336.             <right>142</right>
  337.             <bottom>209</bottom>
  338.         </rect>
  339.         <style>transparent</style>
  340.         <showName> <false /> </showName>
  341.         <highlight> <false /> </highlight>
  342.         <autoHighlight> <false /> </autoHighlight>
  343.         <sharedHighlight> <true /> </sharedHighlight>
  344.         <family>0</family>
  345.         <titleWidth>0</titleWidth>
  346.         <icon>1016</icon>
  347.         <textAlign>center</textAlign>
  348.         <font>Chicago</font>
  349.         <textSize>12</textSize>
  350.         <textStyle>plain</textStyle>
  351.         <name>New Button</name>
  352.         <script></script>
  353.     </part>
  354.     <part>
  355.         <id>9</id>
  356.         <type>button</type>
  357.         <visible> <true /> </visible>
  358.         <reserved5> 0 </reserved5>
  359.         <reserved4> 0 </reserved4>
  360.         <reserved3> 0 </reserved3>
  361.         <reserved2> 0 </reserved2>
  362.         <reserved1> 0 </reserved1>
  363.         <enabled> <true /> </enabled>
  364.         <rect>
  365.             <left>100</left>
  366.             <top>132</top>
  367.             <right>142</right>
  368.             <bottom>155</bottom>
  369.         </rect>
  370.         <style>transparent</style>
  371.         <showName> <false /> </showName>
  372.         <highlight> <false /> </highlight>
  373.         <autoHighlight> <false /> </autoHighlight>
  374.         <sharedHighlight> <true /> </sharedHighlight>
  375.         <family>0</family>
  376.         <titleWidth>0</titleWidth>
  377.         <icon>1016</icon>
  378.         <textAlign>center</textAlign>
  379.         <font>Chicago</font>
  380.         <textSize>12</textSize>
  381.         <textStyle>plain</textStyle>
  382.         <name>New Button</name>
  383.         <script></script>
  384.     </part>
  385.     <part>
  386.         <id>10</id>
  387.         <type>button</type>
  388.         <visible> <true /> </visible>
  389.         <reserved5> 0 </reserved5>
  390.         <reserved4> 0 </reserved4>
  391.         <reserved3> 0 </reserved3>
  392.         <reserved2> 0 </reserved2>
  393.         <reserved1> 0 </reserved1>
  394.         <enabled> <true /> </enabled>
  395.         <rect>
  396.             <left>100</left>
  397.             <top>105</top>
  398.             <right>142</right>
  399.             <bottom>128</bottom>
  400.         </rect>
  401.         <style>transparent</style>
  402.         <showName> <false /> </showName>
  403.         <highlight> <false /> </highlight>
  404.         <autoHighlight> <false /> </autoHighlight>
  405.         <sharedHighlight> <true /> </sharedHighlight>
  406.         <family>0</family>
  407.         <titleWidth>0</titleWidth>
  408.         <icon>1016</icon>
  409.         <textAlign>center</textAlign>
  410.         <font>Chicago</font>
  411.         <textSize>12</textSize>
  412.         <textStyle>plain</textStyle>
  413.         <name>New Button</name>
  414.         <script></script>
  415.     </part>
  416.     <part>
  417.         <id>11</id>
  418.         <type>button</type>
  419.         <visible> <true /> </visible>
  420.         <reserved5> 0 </reserved5>
  421.         <reserved4> 0 </reserved4>
  422.         <reserved3> 0 </reserved3>
  423.         <reserved2> 0 </reserved2>
  424.         <reserved1> 0 </reserved1>
  425.         <enabled> <true /> </enabled>
  426.         <rect>
  427.             <left>4</left>
  428.             <top>105</top>
  429.             <right>47</right>
  430.             <bottom>128</bottom>
  431.         </rect>
  432.         <style>transparent</style>
  433.         <showName> <false /> </showName>
  434.         <highlight> <false /> </highlight>
  435.         <autoHighlight> <false /> </autoHighlight>
  436.         <sharedHighlight> <true /> </sharedHighlight>
  437.         <family>0</family>
  438.         <titleWidth>0</titleWidth>
  439.         <icon>32650</icon>
  440.         <textAlign>center</textAlign>
  441.         <font>Chicago</font>
  442.         <textSize>12</textSize>
  443.         <textStyle>plain</textStyle>
  444.         <name>New Button</name>
  445.         <script></script>
  446.     </part>
  447.     <part>
  448.         <id>12</id>
  449.         <type>button</type>
  450.         <visible> <true /> </visible>
  451.         <reserved5> 0 </reserved5>
  452.         <reserved4> 0 </reserved4>
  453.         <reserved3> 0 </reserved3>
  454.         <reserved2> 0 </reserved2>
  455.         <reserved1> 0 </reserved1>
  456.         <enabled> <true /> </enabled>
  457.         <rect>
  458.             <left>4</left>
  459.             <top>132</top>
  460.             <right>47</right>
  461.             <bottom>155</bottom>
  462.         </rect>
  463.         <style>transparent</style>
  464.         <showName> <false /> </showName>
  465.         <highlight> <false /> </highlight>
  466.         <autoHighlight> <false /> </autoHighlight>
  467.         <sharedHighlight> <true /> </sharedHighlight>
  468.         <family>0</family>
  469.         <titleWidth>0</titleWidth>
  470.         <icon>32650</icon>
  471.         <textAlign>center</textAlign>
  472.         <font>Chicago</font>
  473.         <textSize>12</textSize>
  474.         <textStyle>plain</textStyle>
  475.         <name>New Button</name>
  476.         <script></script>
  477.     </part>
  478.     <part>
  479.         <id>13</id>
  480.         <type>button</type>
  481.         <visible> <true /> </visible>
  482.         <reserved5> 0 </reserved5>
  483.         <reserved4> 0 </reserved4>
  484.         <reserved3> 0 </reserved3>
  485.         <reserved2> 0 </reserved2>
  486.         <reserved1> 0 </reserved1>
  487.         <enabled> <true /> </enabled>
  488.         <rect>
  489.             <left>4</left>
  490.             <top>159</top>
  491.             <right>47</right>
  492.             <bottom>182</bottom>
  493.         </rect>
  494.         <style>transparent</style>
  495.         <showName> <false /> </showName>
  496.         <highlight> <false /> </highlight>
  497.         <autoHighlight> <false /> </autoHighlight>
  498.         <sharedHighlight> <true /> </sharedHighlight>
  499.         <family>0</family>
  500.         <titleWidth>0</titleWidth>
  501.         <icon>32650</icon>
  502.         <textAlign>center</textAlign>
  503.         <font>Chicago</font>
  504.         <textSize>12</textSize>
  505.         <textStyle>plain</textStyle>
  506.         <name>New Button</name>
  507.         <script></script>
  508.     </part>
  509.     <part>
  510.         <id>14</id>
  511.         <type>button</type>
  512.         <visible> <true /> </visible>
  513.         <reserved5> 0 </reserved5>
  514.         <reserved4> 0 </reserved4>
  515.         <reserved3> 0 </reserved3>
  516.         <reserved2> 0 </reserved2>
  517.         <reserved1> 0 </reserved1>
  518.         <enabled> <true /> </enabled>
  519.         <rect>
  520.             <left>4</left>
  521.             <top>186</top>
  522.             <right>47</right>
  523.             <bottom>209</bottom>
  524.         </rect>
  525.         <style>transparent</style>
  526.         <showName> <false /> </showName>
  527.         <highlight> <false /> </highlight>
  528.         <autoHighlight> <false /> </autoHighlight>
  529.         <sharedHighlight> <true /> </sharedHighlight>
  530.         <family>0</family>
  531.         <titleWidth>0</titleWidth>
  532.         <icon>32650</icon>
  533.         <textAlign>center</textAlign>
  534.         <font>Chicago</font>
  535.         <textSize>12</textSize>
  536.         <textStyle>plain</textStyle>
  537.         <name>New Button</name>
  538.         <script></script>
  539.     </part>
  540.     <part>
  541.         <id>15</id>
  542.         <type>field</type>
  543.         <visible> <true /> </visible>
  544.         <dontWrap> <false /> </dontWrap>
  545.         <dontSearch> <false /> </dontSearch>
  546.         <sharedText> <false /> </sharedText>
  547.         <fixedLineHeight> <true /> </fixedLineHeight>
  548.         <autoTab> <false /> </autoTab>
  549.         <lockText> <false /> </lockText>
  550.         <rect>
  551.             <left>129</left>
  552.             <top>226</top>
  553.             <right>347</right>
  554.             <bottom>337</bottom>
  555.         </rect>
  556.         <style>scrolling</style>
  557.         <autoSelect> <false /> </autoSelect>
  558.         <showLines> <false /> </showLines>
  559.         <wideMargins> <false /> </wideMargins>
  560.         <multipleLines> <false /> </multipleLines>
  561.         <reservedFamily> 0 </reservedFamily>
  562.         <titleWidth>0</titleWidth>
  563.         <icon>0</icon>
  564.         <textAlign>left</textAlign>
  565.         <font>Monaco</font>
  566.         <textSize>9</textSize>
  567.         <textStyle>plain</textStyle>
  568.         <textHeight>12</textHeight>
  569.         <name></name>
  570.         <script></script>
  571.     </part>
  572.     <content>
  573.         <layer>card</layer>
  574.         <id>2</id>
  575.         <text>1
  576. 2
  577. 3
  578. 4
  579. 5
  580. 6
  581. 7
  582. 8
  583. 9
  584. 10
  585. 11
  586. 12
  587. 13
  588. 14
  589. 15
  590. 16
  591. 17
  592. 18
  593. 19
  594. 20
  595.  
  596.  
  597. </text>
  598.     </content>
  599.     <content>
  600.         <layer>background</layer>
  601.         <id>1</id>
  602.         <text>1
  603. 2
  604. 3
  605. 4
  606. 5
  607. 6
  608. 7
  609. 8
  610. 9
  611. 10
  612. 11
  613. 12
  614. 13
  615. 14
  616. 15
  617. 16
  618. 17
  619. 18
  620. 19
  621. 20</text>
  622.     </content>
  623.     <content>
  624.         <layer>card</layer>
  625.         <id>3</id>
  626.         <text>1
  627. 2
  628. 3
  629. 4
  630. 5
  631. 6
  632. 7
  633. 8
  634. 9
  635. 10
  636.  
  637.  
  638. </text>
  639.     </content>
  640.     <content>
  641.         <layer>card</layer>
  642.         <id>15</id>
  643.         <text>
  644. NOTICE: This stack and the items in it are not protected by copyright. Use it, peruse it, or abuse it as you will. No charge.
  645.  
  646. OTHER NOTICE: Sure I know this card looks cluttered and is poorly designed. If I was an artist I wouldn't be wasting my time creating such silly stackware or writing these silly instructions to go with it. Give me a break.
  647.  
  648. RAISON D'ETRE, or, how come I made this field:
  649. HyperCard‚Ñ¢ offers little in the way of data structures. If you want to make an array you have to use a field, and for very large arrays a scrollable field is often used. So let's say you have a scrollable field with several hundred lines of information, and you decide you want to check line 75 for errors. How do you find line 75? It is an arduous task (a.k.a. a pain in the... neck).
  650.  
  651. Now there is an easy solution! You just copy the field named    "Line Numberer" (pointed out above to the left) into the same stack as the field you need to check, and with a click of a mouse button (or three, if you haven't yet told Line Numberer which field you want to check) the lines of the field are numbered for you. Wow! If you want to scroll to a specific line and have it numbered too, Line Numberer can do that, too! Wowee!
  652.  
  653. HOW TO USE LINE NUMBERER:
  654. 1. To reduce surprises, be sure to press the "reset card" button (located to the left) before taking the field from this card.
  655. 2. Copy the field labeled "Line Numberer" (also located to the left).
  656. 3. Paste the copy of the Line Numberer field into THE CARD LAYER of the stack in which you want to use it. It will not work in the background layer unless you change information in the field's script.
  657. 4. To use the field perform a mouseUp anyplace over the field.
  658. 5. You will be asked for THE ID NUMBER of the field you want numbered. Enter the appropriate ID number and press "OK".
  659. 6. You will be asked whether the field in question is a Card or Background field. Press the appropriate button.
  660. 7. The Line Numberer field will align itself with the left side of the field you have selected, change its font to match the field, and number the lines.
  661. 8. If you change the scroll position of your field and wish to have it renumbered simply mouseUp over the Line Numberer field. The field will be renumbered without supplying any additional information.
  662. 9. To switch to another field hold the option button down during the mouseUp. You will be prompted to supply the ID number, etc., of the new field.
  663. 10. To scroll to a specific line hold down the shift key during the mouseUp. You will be prompted to supply the line number to which you would like to scroll. Your field will then be scrolled to that point and the line will be numbered.
  664. 11. Once you have told Line Numberer which field you want it to number it will be attached to that field until you switch it to another field (option mouseUp) or until you quit HyperCard‚Ñ¢. This means that if you move the field around, change its rectangle, or font, or whatever, as soon as you do a mouseUp over the Line Numberer field it will move to the left side of your field and renumber itself.
  665. 12. Line Numberer will also number the lines of non-scrollable fields. You may not specify a line number to scroll to with a non-scrollable field, however.
  666.  
  667. WARNING!
  668. Before you use Line Numberer in one of your stacks please note that Line Numberer may change the rectangle or the scroll setting of a scrollable field to which it is attached. 
  669. Why?
  670. In order for Line Numberer to accurately number the lines of a scrollable field, two conditions must be met. 
  671. First, the distance from the top to the bottom of the field must be an exact number of lines. If your field is, for example, three and a half lines long, when you scroll the field with the arrow buttons or by paging   (pressing the mouse in the gray slide bar)  you can end up with only part of a line showing at the top or bottom of the field. Since the Line Numberer field is not scrollable, it cannot shift its contents to match those of your field. So it will shorten your field to the next whole line number.
  672. Second, if you move around in your field by dragging the thumb        (white box in slide bar) or by setting it from a script or the message box you can also end up with a partial line showing at the top or bottom of your field. In this case Line Numberer will scroll your field down to display the nearest whole line.
  673.  
  674. Of course, the first point can also be useful. In order for your fields to scroll neatly they must be an exact number of lines in height. This can be impossible to do by hand (a hit or miss problem), or involves calculating font information. An easy solution is to stretch the field to the approximate length you want, then attach Line Numberer to it. Your field will then be perfectly sized for its font. If you change the font while Line Numberer is attached to the field, just mouseUp on the Line Numberer field and it will resize your field again if necessary.
  675.  
  676. TRY IT OUT HERE FIRST!
  677. The three labeled fields on this card (above and to the right) are example fields. The ID information is listed under each field so you don't have to search the field information to get it. Click on the Line Numberer field and supply the ID information from one of the other fields on the card and see how it works. Scroll the field   (if it is scrollable) and click on the Line Numberer field again. Resize the field and move it around. Change its font. Shift Line Numberer to one of the other fields. Scroll to a specific point in the field. The fields are all numbered to twenty so you can see how the line numbers match up.
  678.  
  679. When you are finished press the  "reset card" button in the lower left corner and the card's contents will be restored to their original state.
  680.  
  681. KNOWN LIMITATIONS:
  682. 1. If your field is so far to the left that the Line Numberer field is offscreen, it won't work too well. In fact, if you attach it to a hidden field I suppose it will leap right off the screen.
  683. 2. Only one copy of Line Numberer can be used at a time without modifying its script. Because of this, if you should lose Line Numberer off the edge of your card (see limitation number 1, above) you cannot simply bring in another copy and have it work. If all else fails, typing:  set the rect of card field "Line Numberer" to 100,100,200,200   will bring it back onscreen. However, if it was attached to an offscreen field, clicking on the Line Numberer field will make it fly offscreen again, so be sure to do an option-click to change it to a visible field.
  684. 3. The Line Numberer field must be placed in the card layer of your stack or it will not work   (unless, of course, you modify its script).
  685. 4. The width of the Line Numberer field is fixed. If the font of your field is so large it won't fit (too wide), or there are so many lines the number is too wide for the field, it will look bad. A simple modification of the Line Numberer field's script will adjust the width of the field. The line to change is in the numberLines message handler, and is the only commented line in the entire script. A larger number will widen the field, a smaller number will make it narrower.
  686.  
  687. AT LAST, THE CREDITS!
  688. Anyone wishing to contact me may do so in the following ways.
  689.  
  690. Compuserve:
  691. William G. Anderson, Jr.
  692. 76254,356
  693.  
  694. GEnie:
  695. OTISGVARY (I'm not sure about this one, it's a guess)
  696.  
  697. MCI:
  698. Superior Process Engineering, Inc.
  699. </text>
  700.     </content>
  701.     <name></name>
  702.     <script></script>
  703. </card>
  704.  
  705.  
  706.